import type { Metadata } from "next";
import { Geist, Geist_Mono } from "next/font/google";
import "./globals.css";
import { ThemeInitializer } from "../components/ThemeInitializer";
// import { GlobalProgressBar } from "../components/GlobalProgressBar"; // 已删除，使用 DynamicLoading 替代
import { QueryProvider } from "../components/QueryProvider";
import { I18nProvider } from "@jjk/guo";

const geistSans = Geist({
  subsets: ["latin"],
  variable: "--font-geist-sans",
});
const geistMono = Geist_Mono({
  subsets: ["latin"],
  variable: "--font-geist-mono",
});

export const metadata: Metadata = {
  title: "医疗空间数字孪生",
  description: "基于 Next.js 的医疗空间数字孪生系统，支持 3D 视图、热力图、KPI 等功能。",
};

export default function RootLayout({
  children,
}: Readonly<{
  children: React.ReactNode;
}>) {
  return (
    <html lang="zh-CN">
      <body
        className={`${geistSans.variable} ${geistMono.variable} antialiased`}
      >
        <QueryProvider>
          {/* GlobalProgressBar 已删除，使用 DynamicLoading 替代 */}
          <ThemeInitializer />
          <I18nProvider>
            {children}
          </I18nProvider>
        </QueryProvider>
      </body>
    </html>
  );
}
